<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/axios.min.js"></script>
    <script>
        function  getInfo(){
            axios.get("/test/getString").then(e =>{
                alert(e.data);

            })
        }

        async function getNum(){
            let num=0;
            await axios.get("/test/getX").then(e=>{
                num=e.data;
            })
            alert(JSON.stringify(num))
        }
    </script>
</head>
<body>
    <input type="button" value="得到" onclick="getInfo()">
    <input TYPE="button" value="得到X" onclick="getNum()">
</body>
</html>